import request from '@/utils/request'

// 查询数据字典类型列表
export function listDatadictype(query) {
  return request({
    url: '/basic/datadictype/list',
    method: 'get',
    params: query
  })
}

// 查询数据字典类型详细
export function getDatadictype(id) {
  return request({
    url: '/basic/datadictype/' + id,
    method: 'get'
  })
}

//同步数据
export function getSyncData(query) {
  return request({
    url: '/basic/datadictype/getSyncData',
    method: 'get',
    params: query
  })
}

// 新增数据字典类型
export function addDatadictype(data) {
  return request({
    url: '/basic/datadictype',
    method: 'post',
    data: data
  })
}

// 修改数据字典类型
export function updateDatadictype(data) {
  return request({
    url: '/basic/datadictype',
    method: 'put',
    data: data
  })
}

// 删除数据字典类型
export function delDatadictype(id) {
  return request({
    url: '/basic/datadictype/' + id,
    method: 'delete'
  })
}

// 导出数据字典类型
export function exportDatadictype(query) {
  return request({
    url: '/basic/datadictype/export',
    method: 'get',
    params: query
  })
}